import {
    createStore,  //创建store
    applyMiddleware, //中间件处理异步action
    combineReducers, //合并多个reducers
} from "redux";

import thunk from 'redux-thunk'  //异步处理中间件

import countReducer from './reducers/countReducer' //引入reducer
import movieReducer from './reducers/movieReducer' //引入reducer

//合并多个reducer
const allReducer = combineReducers({
    count: countReducer,
    movie: movieReducer,
})

//创建restore
const store = createStore(allReducer , applyMiddleware(thunk))

export default store

